package com.huqing.icu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huqing.icu.dto.CommentDto;
import com.huqing.icu.dto.CommentQueryDto;
import com.huqing.icu.model.Comment;

import java.util.List;

public interface CommentMapper extends BaseMapper<Comment> {

    //评论模块看下这篇文章
    //https://juejin.cn/post/6844903709374169102?searchId=202407031526116509F97AF3CFFE13D783


    //点赞数 +1
    Integer incrLikeNum(Long id);

    //点赞数 -1
    Integer decrLikeNum(Long id);

    Integer incrReplyNum(Long id);

    Integer getNumByCondition(CommentQueryDto queryDto);

    List<CommentDto> selectByCondition(CommentQueryDto queryDto);

}
